Skip to content

fix: make the agent plugins work from a clean install - #13

Merged
jbachorik merged 5 commits into
mainfrom
claude/agent-plugins-verification-f25280
Oct 31, 2026
Merged

jbachorik merged 5 commits into
mainfrom
claude/agent-plugins-verification-f25280

Conversation

@jbachorik

Copy link
Copy Markdown
Contributor

What & why

Verifying https://btrace.io/agent-plugins/ found four high-priority bugs, fixed here one per commit, plus a CI step:

  • Clean machine: the BTrace MCP server could not resolve its snapshot dependency, so live probes failed for new users. It now declares the Central snapshots repository, and validation rejects a snapshot //DEPS without a snapshot //REPOS.
  • Subagent tools: allowlists used names that Claude Code does not give plugin tools, so subagents ran without MCP tools. They now use mcp__plugin_<plugin>_<server>__<tool>, and validation enforces it. Specialists can open and close a recording when invoked directly.
  • Pi: Pi ignores the pi.mcp key. An extension now registers jafar and btrace. The alternative, documenting manual pi mcp add, would leave skills without tools after install.
  • Second JVM: a busy port surfaced as Error deploying oneliner: null. Client exceptions are now unwrapped and the message names the port argument. Automatic free-port selection was left out.
  • CI: a new step starts the server with empty JBang directories, because the e2e job's BTRACE_JAR hides resolution failures.

Widening check-tool-references.js to hyphenated names and subskills also exposed pprof_stackprofile and otlp_stackprofile, which the server does not have. jfr-analyzer no longer calls them.

How verified

Check Result
./gradlew clean test e2eTest BUILD SUCCESSFUL; unit 31 tests, 0 failed; e2e 13 tests, 0 failed
node scripts/validate-repository.js Repository consistency valid: 5 plugins, 31 skills
node scripts/check-tool-references.js OK: all 37 referenced tools exist on the server.
scripts/validate-marketplace.sh Marketplace validation passed.
Server with empty JBang directories tools/list returned 9 tools
cpu-analyst, perf-lead, jfr-analyzer:perf-engineer in claude -p All called MCP tools; perf-lead dispatched cpu-analyst
Fresh pi install, logging jbang wrapper Pi started both servers with the expected arguments
Two live JVMs on the default port Second gets the new error on deploy_oneliner and list_probes; port: 2021 deploys

Coverage notes

New unit tests cover the busy-port and no-message errors, and a new e2e case covers a busy port on a fresh JVM. The Pi extension has no automated test. Evals were not run.

Not verified / known limitations

  • Pi tools in a live model session: no API key was available. A signed-in pi session calling the tools would verify it.
  • Codex and Pi with the new allowed-tools names: not tested on either host.
  • jfr-analyzer's pprof and OTLP paths after the skill change: not run through the full flow.
  • BTrace is still a floating 3.0.0-SNAPSHOT, so a bad snapshot can break new installs, and the new CI step depends on the published snapshot.

Draft because of the first three items. Running those checks, or accepting them as known gaps, flips it to ready.

Breaking changes / migration

None. A jafar or btrace server in a Pi user's mcp.json takes precedence over the extension's.

Links

The gh-pages update follows this merge, because its Pi text describes the new extension.

🤖 Generated with Claude Code

jbachorik and others added 5 commits October 31, 2026 22:22
The server depends on io.btrace:btrace:3.0.0-SNAPSHOT with no //REPOS, and JBang searches only Maven Central, so it could not start for a new user. It stayed hidden on machines with the artifact in ~/.m2 and in CI, which sets BTRACE_JAR. Add the Central snapshots repository and fail repository validation when a snapshot //DEPS has no snapshot //REPOS.

Verified: JBang with empty JBANG_DIR and JBANG_REPO answers tools/list with 9 tools; removing the line fails validate-repository.js; gradlew test 31 passed, e2eTest 13 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code names plugin tools mcp__plugin_<plugin>_<server>__<tool>, so allowlists using mcp__jafar__ and mcp__jfr-mcp__ matched nothing and subagents ran without MCP tools. Use the qualified names, validate them, use bare tool names in jfr-analyzer prose, and let the specialists open and close a recording when invoked directly.

check-tool-references.js missed hyphenated names and all subskills. Widening it exposed pprof_stackprofile and otlp_stackprofile, which the server does not have, so triage now skips that step for pprof and OTLP, and drilldown uses otlp_flamegraph and otlp_query.

Verified: cpu-analyst, perf-lead and jfr-analyzer:perf-engineer called MCP tools in claude -p, and perf-lead dispatched cpu-analyst; check-tool-references.js reports all 37 referenced tools exist; validate-marketplace.sh passed. Not tested on Codex or Pi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pi reads only extensions, skills, prompts and themes from a package manifest, so the pi.mcp key had no effect and no server was registered. Replace it with an extension that registers jafar and btrace.

Verified: after pi install in a fresh agent directory, a logging jbang wrapper recorded Pi starting both servers with the expected arguments. Not verified in a live model session, because Pi has no API key here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reflection wrapped client exceptions in an InvocationTargetException with a null message, so a second JVM on the default port failed with 'Error deploying oneliner: null'. Unwrap the cause, name the port argument when the port is busy, and always return a non-null message.

Verified: with two live JVMs the second gets the new error on deploy_oneliner and list_probes, and port 2021 deploys; new unit and e2e cases pass; gradlew test 31 passed, e2eTest 13 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The e2e job sets BTRACE_JAR, so it passed while the server could not start for a new user. Add a step that starts the server with empty JBang directories and checks tools/list.

Verified: the same handshake against empty JBang directories locally returns the tools/list response; the step itself runs for the first time on this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jbachorik
jbachorik marked this pull request as ready for review October 31, 2026 21:32
@jbachorik
jbachorik merged commit aee12f9 into main Oct 31, 2026
4 checks passed
jbachorik added a commit that referenced this pull request Oct 31, 2026
Verifying the page found steps that fail when pasted and stale details. Codex now gets a working path and install command; Pi describes the MCP servers registered by #13; JBang and async-profiler needs are stated; jafar-perf and btrace-development cards match the plugins; the footer links to btrace.io; and skill rows no longer overflow on phones.

Verified: the same edits rendered locally with no console errors, and the phone page width went from 441px to 375px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant